<?php
	include_once 'isLogin.php';
	
	if($_GET['action']=='sort'){
		$arr = array("sort"=>$_POST['sort']);
		$commonc->update("sort", $arr ,"id='".$_POST['id']."'");
		exit();
	}
	
	//得到所有内容
	$sql="sort order by sort desc,id desc";
	$row=$commonc->getList($sql,$sql);
	
	$smarty->assign("row",$row['result']);
	$smarty->assign('page',$row['page']);
	$smarty->display("common_sort.html");
?>